/*
* 折线图
*
*/

import React, { Component } from 'react';
import { Chart, Line, Tooltip, Axis, Legend } from 'bizcharts';


export class LineChart extends Component {
	static defaultProps = {};

	constructor(props) {
		super(props);

		this.tw = null;
		this.rw = null;
		this.state = {};
	}

	componentDidMount() {}


	render() {
		const { data, scale, lineProps } = this.props;
		const toolTipProps = {showCrosshairs: true, shared: true}

		return (
			<div style={{width: '100%', height: '100%'}}>
				<Chart autoFit padding="auto" data={data} scale={scale}>
					<Legend visible={false} />
					<Line {...lineProps}/>
					<Tooltip {...toolTipProps} />
					<Axis name={'y'} grid={null}/>
				</Chart>
			</div>
		);
	}
}

export default LineChart;
